package cc.cc4414.cc02.system.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import cc.cc4414.cc02.core.controller.BaseController;
import cc.cc4414.cc02.core.result.ResultVO;
import cc.cc4414.cc02.system.entity.OperationLog;
import cc.cc4414.cc02.system.service.OperationLogService;

/**
 * @author cc 2018年8月4日
 */
@RestController
@RequestMapping("/operationLog")
public class OperationLogController extends BaseController {

	@Autowired
	private OperationLogService operationLogService;

	/**
	 * 分页查询操作日志
	 * 
	 * @param page
	 *            当前页数，从0开始计算
	 * @param size
	 *            每页行数
	 * @return 分页查询用户的信息
	 */
	@GetMapping("findAll")
	public ResultVO<Page<OperationLog>> findAll(@RequestParam int page, @RequestParam int size) {
		return new ResultVO<Page<OperationLog>>(operationLogService.findAll(page, size));
	}

}
